package com.czw.hibernate.controller;


import com.czw.hibernate.entity.User;
import com.czw.hibernate.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;


/**
 * @author czw
 */
@RestController
@RequestMapping("/hello")
public class HelloController {


    @Autowired
    private UserService userService;

    @RequestMapping("/hello1")
    public List<User> Hello(){
        User user = userService.queryById("402832815fd26307015fd2630ef30000");
        List<User> list = new ArrayList<>();
        list.add(user);
        return list;
    }


}
